<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- checked:默认选中 -->
    <input class="box" type="checkbox" checked>

    <input type="checkbox" class="box1">

    <script>
        let input = document.querySelector('.box')

       input.onclick = function(e){
        // checked:选中状态
        console.log(this.checked);
        document.querySelector('.box1').checked = this.checked
        
       }
        
    </script>
    
</body>
</html>